package com.cloud.two.ribbon.controller;

import com.cloud.two.ribbon.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author henryGui
 * @version V1.0
 * @Title: HelloControler
 * @Package com.cloud.two.ribbon.controller
 * @Description: TODO
 * @date 2018-06-18 下午2:02
 */
@RestController
public class HelloControler {

    @Autowired
    HelloService helloService;

    @RequestMapping(value = "/hi")
    public String hi(@RequestParam String name){
        return helloService.hiService(name);
    }

    @RequestMapping(value = "/demo")
    public ResponseEntity demo(@RequestParam String name){
        return helloService.hiService1(name);
    }

    @RequestMapping(value = "/demo2")
    public ResponseEntity demo2(){
        return helloService.hiService2();
    }


}